home *** CD-ROM | disk | FTP | other *** search
- Path: ix.netcom.com!netnews
- From: miker3@ix.netcom.com (Mike Rubenstein)
- Newsgroups: comp.lang.c
- Subject: Re: pointers
- Date: Tue, 27 Feb 1996 14:42:37 GMT
- Organization: Netcom
- Message-ID: <3133179a.53490495@nntp.ix.netcom.com>
- References: <4gqh8g$bo4@news.bu.edu> <Pine.A32.3.91.960225212528.135696D-100000@red.weeg.uiowa.edu>
- NNTP-Posting-Host: ix-dc12-08.ix.netcom.com
- X-NETCOM-Date: Tue Feb 27 6:42:27 AM PST 1996
- X-Newsreader: Forte Agent .99d/32.182
-
- The Amorphous Mass <robinson@blue.weeg.uiowa.edu> wrote:
-
- > On 25 Feb 1996, wai yip wrote:
- >
- > > can someone who knows a lot about pointers help me with this
- > >
- > > int i=3,*p;
- > >
- > > with the above declaration, what would the bottom lines do?
- > > *p=&i;
- >
- > Set the value p points to to i's address, which will result in an
- > implementation-defined conversion from pointer value to integer. This is
- > seldom desired. If this assignment immediately follows the above
- > declaration (so that p doesn't point to any legal location) then the
- > results of this statement are undefined. This is never desired.
-
- This is not an automatic conversion and a diagnostic is required since
- it violates a constraint in 6.3.16.1.
-
- >
- > > p=i;
- >
- > Sets p to the value of i. This forces conversion of an int (3) to a
- > pointer value, the results of which are again implementation defined.
- > This too is seldom desired.
-
- This is not an automatic conversion and a diagnostic is required since
- it violates a constraint in 6.3.16.1.
-
-
- Michael M Rubenstein
-